
import React from "react";
import { NavLink, useRoutes } from "react-router-dom";
import route from "./router/index"
import "./c.css"
function App() {
    const element = useRoutes(route)
    function isActive({ isActive }) {
        return isActive ? "box" : ""
    }
    return (
        <div>
            <NavLink className={isActive} to="/one">去one</NavLink>
            <NavLink className={isActive} to="/tow">去tow</NavLink>
            <NavLink className={isActive} to="/three">去three</NavLink>
            {element}
        </div>
    );
}

export default App;